<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\Schema;

class CreateTableRecipes extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('recipes', function($table)
		{
		    $table->increments('id');
		    $table->string( 'name', 120 );
		    $table->string( 'description', 255 );
		    $table->string( 'image_url', 120 )->nullable(false);
		    $table->string( 'video_url', 120 )->nullable(true);
		    $table->integer( 'user_id' );
		    $table->timestamps();
		    $table->softDeletes();
		});
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('recipes');
	}

}
